public class Person {
    private String name;
    private int age;
    private double balance;
    private boolean isSingle;
    public void setName(String nameparam){
        name = nameparam;
    }
    public String getName(){
        return name;
    }
    public void setAge(int ageparam){
        if(ageparam<1 || ageparam >120){
            System.out.println("年纪不合法");
        }else {
            age =ageparam;
        }
    }
    public int getAge(){
        return age;
    }
}
